<!DOCTYPE html> 
<html>
  <head>
    <!--META-->
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <meta name="msapplication-tap-highlight" content="no" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">

    <!--CSS-->
    <link rel="shortcut icon" href="img/favicon.ico">
    <link rel="stylesheet" href="API/css/themes/default/jquery.mobile.min.css" />
    <link rel="stylesheet" href="API/css/mycss.css" />
    <link rel="stylesheet" href="css/mycss.css" />

    <!--JS-->
    <script type="text/javascript" src="include/config.js"></script>
    <script type="text/javascript" src="API/js/Jquery/jquery.min.js"></script>
    <script type="text/javascript" src="API/js/JqueryMobile/jquery.mobile.min.js"></script>
    <script type="text/javascript" src="API/js/Highcharts/highcharts.js"></script>
    <script type="text/javascript" src="API/js/Highcharts/modules/exporting.js"></script>
    <script type="text/javascript" src="API/js/functionsLib.js"></script>
    <script type="text/javascript" src="js/fonctions.js"></script>

    <script type="text/javascript">
    ///////////////////
    //BLOCK VARIABLE GLOBAL
    ///////////////////
    var id_page = 27;

    ///////////////////
    //BLOCK FONCTIONS EVENEMENTS
    ///////////////////

    //Fin chargement page
    function OnLoad() {
        try {
            chargerRepartitionMetaG();
            chargerRepartitionMetaNC();
            chargerRepartitionMetaC();
            chargerRepartitionMetaA();
        } catch (er) {
            $.functionsLib.log(0, "ERROR(OnLoad):" + er.message);
        }
    }

    ///////////////////
    //BLOCK FONCTIONS METIER
    ///////////////////
    /**
     * chargerRepartitionMetaG
     */
    function chargerRepartitionMetaG(){
        try {
            var tabInput = { type : '' };
            var json_retour = $.functionsLib.callRest(domaine+"phpsql/getRepartitionMeta.php", {}, tabInput); 
            if(json_retour["strErreur"] == ""){
                afficherMeta('Meta Générale', '#div_repartitionMetaG', json_retour);
            } else{
                $.functionsLib.notification("Erreur : "+json_retour["strErreur"], $.functionsLib.oda_msg_color.ERROR);
            }
        } catch (er) {
            $.functionsLib.log(0, "ERROR(chargerRepartitionMetaG):" + er.message);
        }
    }
    
    /**
     * chargerRepartitionMetaNC
     */
    function chargerRepartitionMetaNC(){
        try {
            var tabInput = { type : 'Non classé' };
            var json_retour = $.functionsLib.callRest(domaine+"phpsql/getRepartitionMeta.php", {}, tabInput); 
            if(json_retour["strErreur"] == ""){
                afficherMeta('Meta Non Classé', '#div_repartitionMetaNC', json_retour);
            } else{
                $.functionsLib.notification("Erreur : "+json_retour["strErreur"], $.functionsLib.oda_msg_color.ERROR);
            }
        } catch (er) {
            $.functionsLib.log(0, "ERROR(chargerRepartitionMetaNC):" + er.message);
        }
    }
    
    /**
     * chargerRepartitionMetaC
     */
    function chargerRepartitionMetaC(){
        try {
            var tabInput = { type : 'Classé' };
            var json_retour = $.functionsLib.callRest(domaine+"phpsql/getRepartitionMeta.php", {}, tabInput); 
            if(json_retour["strErreur"] == ""){
                afficherMeta('Meta Classé', '#div_repartitionMetaC', json_retour);
            } else{
                $.functionsLib.notification("Erreur : "+json_retour["strErreur"], $.functionsLib.oda_msg_color.ERROR);
            }
        } catch (er) {
            $.functionsLib.log(0, "ERROR(chargerRepartitionMetaC):" + er.message);
        }
    }
    
    /**
     * chargerRepartitionMetaA
     */
    function chargerRepartitionMetaA(){
        try {
            var tabInput = { type : 'Arene' };
            var json_retour = $.functionsLib.callRest(domaine+"phpsql/getRepartitionMeta.php", {}, tabInput); 
            if(json_retour["strErreur"] == ""){
                afficherMeta('Meta Arène', '#div_repartitionMetaA', json_retour);
            } else{
                $.functionsLib.notification("Erreur : "+json_retour["strErreur"], $.functionsLib.oda_msg_color.ERROR);
            }
        } catch (er) {
            $.functionsLib.log(0, "ERROR(chargerRepartitionMetaA):" + er.message);
        }
    }

    ///////////////////
    //BLOCK FONCTIONS AFFICHAGE
    ///////////////////
</script>

</head>
<body onload="OnLoad();">

    <!-- page -->
    <div data-role="page" data-title="Titre">

        <!-- /panel -->
        <div data-role="panel" id="mypanel" data-display="overlay" data-position="left">

        </div>
        <!-- /panel -->

        <!-- header -->
        <div data-role="header" data-position="fixed">
            <a href="#mypanel" data-role="button" data-icon="home" data-iconpos="notext">home</a>
            <h1 id="id_titre">titre</h1>
            <a href="javascript:window.location = ('./api_page_contact.html?mili='+$.functionsLib.getMilise());" data-role="button" data-icon="info" data-iconpos="notext">Contact</a>
        </div>
        <!-- /header -->
        
        <!-- navbar -->
        <!-- /navbar -->

        <!-- content -->
        <div data-role="content" id="main_content">
            <div data-role="collapsible" data-collapsed="false" data-mini="true">
                <h2>La Méta</h2>
                <div class="ui-grid-a">
                    <div class="ui-block-a">
                        <div id="div_repartitionMetaG">Chargement...</div>
                    </div>
                    <div class="ui-block-b">
                        <div id="div_repartitionMetaNC">Chargement...</div>
                    </div>
                    <div class="ui-block-a">
                        <div id="div_repartitionMetaC">Chargement...</div>
                    </div>
                    <div class="ui-block-b">
                        <div id="div_repartitionMetaA">Chargement...</div>
                    </div>
                </div>
            </div>       
        </div>
        <!-- /content -->

        <!-- footer -->
        <div data-role="footer" data-position="fixed">
            <a data-role="button" data-icon="search" data-iconpos="notext" class="ui-btn-left" href="javascript:window.location = ('./api_page_faq.html?mili='+$.functionsLib.getMilise());">FAQ</a>
            <h1 id="id_affichageUser">User</h1>
            <a data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" href="javascript:window.location = ('./api_page_sortie.html?mili='+$.functionsLib.getMilise());">Logout</a>
        </div>
        <!-- /footer -->

    </div>
    <!-- /page -->
</body>
</html>